package com.lagou.sqlSession;

import com.lagou.pojo.Configuration;
import com.lagou.pojo.MappedStatement;

import java.util.List;

public interface SqlSession {
    //查询所有
    public <E> List<E> selectList(MappedStatement mappedStatement,Object... params) throws Exception;
    //根据条件查询单个

    public <T> T selectOne(MappedStatement mappedStatement,Object...params) throws Exception;

    <T> T getMapper(Class<?> mapperClass);

    Configuration getConfiguration();



    int insert(MappedStatement mappedStatement, Object... parameter) throws Exception;


    int update(MappedStatement mappedStatement, Object... parameter)throws  Exception;

    int delete(MappedStatement mappedStatement, Object... parameter)throws Exception;

}
